package com.xhwy.controller;

import com.xhwy.param.UserLoginParam;
import com.xhwy.param.UserParam;
import com.xhwy.service.UserService;
import com.xhwy.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public R login(@RequestBody UserLoginParam userLoginParam){
        return userService.login(userLoginParam);
    }
}
